<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: ipc::shm::classic::Pool_arena::Handle_in_shm&lt; T &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceipc.html">ipc</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1shm.html">shm</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1shm_1_1classic.html">classic</a></li><li class="navelem"><a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html">Pool_arena</a></li><li class="navelem"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html">Handle_in_shm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">ipc::shm::classic::Pool_arena::Handle_in_shm&lt; T &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>The data structure stored in SHM corresponding to an original <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a>-returned <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a>; exactly one of which exists per <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a> call invoked from any <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html" title="A SHM-classic interface around a single SHM pool with allocation-algorithm services by boost....">Pool_arena</a> connected to the underlying pool.  
 <a href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for ipc::shm::classic::Pool_arena::Handle_in_shm&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm__coll__graph.svg" width="242" height="239"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aef706713d40d801d0cb213e08201c571"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571">Atomic_owner_ct</a> = std::atomic&lt; unsigned int &gt;</td></tr>
<tr class="memdesc:aef706713d40d801d0cb213e08201c571"><td class="mdescLeft">&#160;</td><td class="mdescRight">Atomically accessed count of each time the following events occurs for a given <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a> in the backing pool:  <a href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571">More...</a><br /></td></tr>
<tr class="separator:aef706713d40d801d0cb213e08201c571"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ac787f6c20943bc76027cf25c7548d797"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#ac787f6c20943bc76027cf25c7548d797">m_obj</a></td></tr>
<tr class="memdesc:ac787f6c20943bc76027cf25c7548d797"><td class="mdescLeft">&#160;</td><td class="mdescRight">The constructed object; <code>Handle::get()</code> returns <code>&amp;m_obj</code>.  <a href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#ac787f6c20943bc76027cf25c7548d797">More...</a><br /></td></tr>
<tr class="separator:ac787f6c20943bc76027cf25c7548d797"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa801c3aa3c8f15945c5ac94936bd072d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571">Atomic_owner_ct</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aa801c3aa3c8f15945c5ac94936bd072d">m_atomic_owner_ct</a></td></tr>
<tr class="memdesc:aa801c3aa3c8f15945c5ac94936bd072d"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571" title="Atomically accessed count of each time the following events occurs for a given Handle_in_shm in the b...">Atomic_owner_ct</a> doc header. This value is 1+; once it reaches 0 <code>*this</code> is destroyed in SHM.  <a href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aa801c3aa3c8f15945c5ac94936bd072d">More...</a><br /></td></tr>
<tr class="separator:aa801c3aa3c8f15945c5ac94936bd072d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename T&gt;<br />
struct ipc::shm::classic::Pool_arena::Handle_in_shm&lt; T &gt;</div><p >The data structure stored in SHM corresponding to an original <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a>-returned <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a>; exactly one of which exists per <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a> call invoked from any <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html" title="A SHM-classic interface around a single SHM pool with allocation-algorithm services by boost....">Pool_arena</a> connected to the underlying pool. </p>
<p >It is created in <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a> and placed in the SHM pool. It is destroyed once its <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aa801c3aa3c8f15945c5ac94936bd072d" title="See Atomic_owner_ct doc header. This value is 1+; once it reaches 0 *this is destroyed in SHM.">m_atomic_owner_ct</a> reaches 0, which occurs once the last process for which a <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a> (<code>shared_ptr</code>) group ref-count reaches 0 detects this fact in its custom deleter and internally invokes <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a394973b7cfb67b67113043810804337d" title="Undoes effects of local allocate() that returned buf_not_null; or another-process&#39;s allocate() that r...">deallocate()</a> for the buffer, wherein the <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a> resides.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>The <code>T</code> from the associated <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a>. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="pool__arena_8hpp_source.html#l00525">525</a> of file <a class="el" href="pool__arena_8hpp_source.html">pool_arena.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="aef706713d40d801d0cb213e08201c571" name="aef706713d40d801d0cb213e08201c571"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef706713d40d801d0cb213e08201c571">&#9670;&nbsp;</a></span>Atomic_owner_ct</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html">ipc::shm::classic::Pool_arena::Handle_in_shm</a>&lt; T &gt;::Atomic_owner_ct =  std::atomic&lt;unsigned int&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Atomically accessed count of each time the following events occurs for a given <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a> in the backing pool: </p>
<ul>
<li>initial construction via <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#ab9f7ea056a55183d00dcbce573afcf36" title="Constructs an object of given type with given ctor args, having allocated space directly in attached ...">construct()</a>, which returns the original <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a> and creates the <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a>;</li>
<li>each call to <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#acb300e64f92ab0aa5b70f8313c79a899" title="Adds an owner process to the owner count of the given construct()-created handle, and returns an opaq...">lend_object()</a> on that <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a> (internally, on the associated <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a>);</li>
<li><em>minus</em> any corresponding invocations of the <a class="el" href="classipc_1_1shm_1_1classic_1_1Pool__arena.html#a662a55c9ba6eb5c389ddf9780ee801cb" title="Outer handle to a SHM-stored object; really a regular-looking shared_ptr but with custom deleter that...">Handle</a> custom deleter. </li>
</ul>

<p class="definition">Definition at line <a class="el" href="pool__arena_8hpp_source.html#l00537">537</a> of file <a class="el" href="pool__arena_8hpp_source.html">pool_arena.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa801c3aa3c8f15945c5ac94936bd072d" name="aa801c3aa3c8f15945c5ac94936bd072d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa801c3aa3c8f15945c5ac94936bd072d">&#9670;&nbsp;</a></span>m_atomic_owner_ct</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571">Atomic_owner_ct</a> <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html">ipc::shm::classic::Pool_arena::Handle_in_shm</a>&lt; T &gt;::m_atomic_owner_ct</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>See <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html#aef706713d40d801d0cb213e08201c571" title="Atomically accessed count of each time the following events occurs for a given Handle_in_shm in the b...">Atomic_owner_ct</a> doc header. This value is 1+; once it reaches 0 <code>*this</code> is destroyed in SHM. </p>

<p class="definition">Definition at line <a class="el" href="pool__arena_8hpp_source.html#l00549">549</a> of file <a class="el" href="pool__arena_8hpp_source.html">pool_arena.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="pool__arena_8hpp_source.html#l00734">ipc::shm::classic::Pool_arena::handle_deleter_impl()</a>, and <a class="el" href="pool__arena_8hpp_source.html#l00661">ipc::shm::classic::Pool_arena::lend_object()</a>.</p>

</div>
</div>
<a id="ac787f6c20943bc76027cf25c7548d797" name="ac787f6c20943bc76027cf25c7548d797"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac787f6c20943bc76027cf25c7548d797">&#9670;&nbsp;</a></span>m_obj</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html">ipc::shm::classic::Pool_arena::Handle_in_shm</a>&lt; T &gt;::m_obj</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The constructed object; <code>Handle::get()</code> returns <code>&amp;m_obj</code>. </p>
<p >This must be the first member in <a class="el" href="structipc_1_1shm_1_1classic_1_1Pool__arena_1_1Handle__in__shm.html" title="The data structure stored in SHM corresponding to an original construct()-returned Handle; exactly on...">Handle_in_shm</a>, because the custom deleter <code>reinterpret_cast</code>s <code>Handle::get()</code> to mean <code>Handle_in_shm*</code>. If this arrangement is modified, one would need to use <code>offsetof</code> (or something) as well. </p>

<p class="definition">Definition at line <a class="el" href="pool__arena_8hpp_source.html#l00546">546</a> of file <a class="el" href="pool__arena_8hpp_source.html">pool_arena.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="pool__arena_8hpp_source.html#l00734">ipc::shm::classic::Pool_arena::handle_deleter_impl()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>shm/classic/<a class="el" href="pool__arena_8hpp_source.html">pool_arena.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 11 2025 20:02:26 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
